Method: rich.text.Text.render.<locals>.get_current_style
Calls: 5049, Exceptions: 0, Paths: 2Back
Path 1: 2808 calls (0.56)
Style (2808)
1def get_current_style() -> Style:
2 """Construct current style from stack."""
3 styles = tuple(style_map[_style_id] for _style_id in sorted(stack))
4 cached_style = style_cache_get(styles)
5 if cached_style is not None:
6 return cached_style
7 current_style = combine(styles)
8 style_cache[styles] = current_style
9 return current_style
Path 2: 2241 calls (0.44)
Style (2241)
1def get_current_style() -> Style:
2 """Construct current style from stack."""
3 styles = tuple(style_map[_style_id] for _style_id in sorted(stack))
4 cached_style = style_cache_get(styles)
5 if cached_style is not None:
6 return cached_style
7 current_style = combine(styles)
8 style_cache[styles] = current_style
9 return current_style